﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CRMSalesManagement.FrontPageShow
{
    public partial class DetailNews : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                try
                {
                    if (Request.QueryString["id"] != null)
                    {
                        int id = Convert.ToInt32(Request.QueryString["id"]);
                        var news =CRM.Business.NewList.GetNewById(id);
                        //CommonSiteMap.setType(news.type);
                        //CommonSiteMap.foreOrBack = true;

                        if (news != null)
                        {
                            this.lblTitle.Text = news.title;
                            this.lblPublishTime.Text = news.date.ToString();
                            this.lblAuthor.Text = news.author;
                            this.divContentText.InnerHtml = news.content;
                        }
                    }
                }
                catch (Exception)
                {
                    //跳转至异常页面
                }
            }
        }
    }
}